package nccloud.web.hihr.ext.action;

import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;

import nc.bs.framework.json.core.exception.ExceptionUtils;
import nc.itf.hrhi.bill.IXcHrExtBillService;
import nc.vo.pub.BusinessException;
import nccloud.framework.service.ServiceLocator;
import nccloud.framework.web.action.itf.ICommonAction;
import nccloud.framework.web.container.IRequest;

public class QysLxOper implements ICommonAction{

	@Override
	public Object doAction(IRequest request) {
		String content = request.read();
		JSONObject root = JSONObject.parseObject(content);
		String pk_qyschoose = root.getString("value");
		JSONArray arr = root.getJSONArray("pk_psndocs");
		
		String[] pk_psndocs = new String[arr.size()];
		for(int i = 0; i < pk_psndocs.length; i ++) {
			pk_psndocs[i] = arr.getString(i);
		}
		
		try {
			ServiceLocator.find(IXcHrExtBillService.class).qysLxOper(pk_qyschoose, pk_psndocs);
		} catch (BusinessException e) {
			ExceptionUtils.wrapException(e);
		}
		
		return null;
	}

}
